<%@ page import="com.hxl.pojo.People" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>


<%
    //下面那句话等价于
    /*
    People people = new People();
    people.setId();
    people.setName();
    people.setAge();
    people.setAddress();

     */
%>
<jsp:useBean id="people" class="com.hxl.pojo.People" scope="page"/>
<%--name代表你要设的对象，property代表属性--%>
<jsp:setProperty name="people" property="id" value="4"/>
<jsp:setProperty name="people" property="name" value="老四"/>
<jsp:setProperty name="people" property="age" value="5"/>
<jsp:setProperty name="people" property="address" value="天"/>

<%--
下面就相当于<%=people.getId()%>
--%>
id：<jsp:getProperty name="people" property="id"/>
姓名：<jsp:getProperty name="people" property="name"/>
年龄：<jsp:getProperty name="people" property="age"/>
地址：<jsp:getProperty name="people" property="address"/>

</body>
</html>
